package com.example.drcbackend.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.drcbackend.Mapper.functionaldependenciesMapper;
import com.example.drcbackend.entity.attributessets;
import com.example.drcbackend.entity.functionaldependencies;
import com.example.drcbackend.jwt.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/fd")
@RestController
@CrossOrigin
public class FunctionaldependenciesController {
    @Autowired
    private functionaldependenciesMapper fdm;

    @PostMapping("/createfd")//存入函数依赖集
    public Result createfd(@RequestBody List<functionaldependencies> fdData) {
        for(functionaldependencies fds:fdData){
            fdm.insert(fds);
        }
        return Result.ok().message("函数依赖集插入成功");
    }
}
